package com.wanho.java157.crm.customerManage.customer.controller;


import com.wanho.java157.crm.customerManage.customer.po.Stu;
import com.wanho.java157.crm.customerManage.customer.service.StuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/stu")
public class StuController {
    @Autowired
    private StuService stuService ;

    @RequestMapping("/list")
    public String list(Model model){
        List<Stu> stuList = stuService.selectAll();
        model.addAttribute("stuList",stuList) ;
        System.out.println("========="+stuList);
        return "list-stu" ;
    }
}
